package com.study;

import javax.persistence.EntityManager;

import com.google.inject.Inject;
import com.google.inject.Provider;
import com.google.inject.persist.Transactional;

public class LoginUserDao {
	@Inject
	private Provider<EntityManager> em;
	
	private EntityManager em() {
		return em.get();
	}
	
	@Transactional
	public void insert(LoginUser user) {
		em().persist(user);
	}
}
